package com.yc.biz;

import lombok.Data;

// 编译期异常
@Data
public class BizException extends Exception {

    // 异常数据
    private Object data;

    public BizException(Object data) {
        this.data = data;
    }

    public BizException(String message, Object data) {
        super(message);
        this.data = data;
    }

    public BizException(String message, Throwable cause, Object data) {
        super(message, cause);
        this.data = data;
    }

    public BizException(Throwable cause, Object data) {
        super(cause);
        this.data = data;
    }

    public BizException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, Object data) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.data = data;
    }
}
